<template>
  <div class="app-container">
    <rva-tcrud :appId="appId" v-if="appId!=''" :requestParams="requestParams"></rva-tcrud>
  </div>
</template>

<script>
import RvaTreeCrud from "@/components/rva/tcrud";

export default {
  name: "RvaTreeCrudEntry",
  components: {
    "rva-tcrud": RvaTreeCrud
  },
  data() {
    return {
      appId : '',
      requestParams : {trigger: 0}
    };
  },
  created() {
    if (this.$route.params && this.$route.params.appId) {
      this.appId = this.$route.params.appId;
    } else {
      let strs = this.$route.path.split('/');
      this.appId = strs[strs.length - 1];
    }
    if (sessionStorage.getItem(this.$route.path)) {
      this.requestParams['rvaAppParams'] = JSON.parse(sessionStorage.getItem(this.$route.path));
      this.requestParams.trigger ++;
    }
  }
};
</script>
